package com.java1234.rocketmq;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.annotation.SelectorType;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @author zhaolin
 * @version 1.0
 * @description: TODO
 * @date 2025/2/7 14:31
 * ，selectorExpression = "type='user' or a <7",selectorType = SelectorType.SQL92 ，指定
 * selectorType 以及设置表达式selectorExpression
 */
@RocketMQMessageListener(topic = "java1234-filter-rocketmq",consumerGroup
        ="${rocketmq.consumer.group}" ,
        selectorExpression="type='user' or a <7",
        selectorType = SelectorType.SQL92)
@Component
public class ConsumerService4 implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {
        System.out.println("消费者：收到消息内容："+s);
    }
}
